Skip to main content

Common Json Types

This page is a reference to the many Json/Python Dict types which are used as parameters for Pikaview scripts and templates.

Table

{
'tableName': string,
'schema': string (optional),
'alias': string (optional)
}

Field

{
'columnName': string,
'alias': string (optional),
'tableName': string,
'tableAlias': string (optional),
'tableSchema': string (optional)
}
OR
{
'alias': string,
'function': string,
'params': [
{
'columnName': string
}
OR
{
'stringValue': string
}
]
}

Filter

{
'field': any | Field,
'comparisonOperator': string,
'comparisonValue': any | Field,
'comparisonValue2': any | Field (optional - only needed for operators that require two values, e.g. 'between'),
}
OR
{
'logicalOperator': ('AND' | 'OR'),
'subItems': [
{
'field': any | Field,
'comparisonOperator': string,
'comparisonValue': any | Field,
'comparisonValue2': any | Field (optional - only needed for operators that require two values, e.g. 'between')
}
]
}

Subitems can contain arbitrary levels of nested objects.

Order By

{
'field': Field,
'direction': ('ASC' | 'DESC')
}

Join

{
'order': int,
'joinType': ('INNER' | 'OUTER' | 'CROSS' | 'LEFT' |'RIGHT'),
'joinTableName': string,
'joinTableSchema': string,
'joinAlias': string (optional),
'onCondition': Filter # the 'field' should be a column from the base table, 'comparisonValue' should be a column from the join table
'selectFields': Field[]
}